2a816ef5a81e7830fec8b8f20e710ecca5d4d2b4,workbench/source_gen/jetbrains/mps/workbench/dialogs/project/components/parts/creators/SolutionChooser.java,SolutionChooser,compute,#,22
Before Change
}
public List<ModuleReference> compute() {
List<Solution> solutions = ModelAccess.instance().runReadAction(new Computable<List<Solution>>() {
public List<Solution> compute() {
return MPSModuleRepository.getInstance().getAllSolutions();
}
});
List<Solution> solution = CommonChoosers.showDialogModuleCollectionChooser(myOwner.getMainComponent(), "solution", solutions, null);
if (solution == null) {
return null;
}
List<ModuleReference> references = new ArrayList<ModuleReference>();
for (Solution s : solution) {
references.add(s.getModuleReference());
}
return references;
}
}
After Change
}
public List<ModuleReference> compute() {
final Wrappers._T<List<ModuleReference>> solRefs = new Wrappers._T<List<ModuleReference>>();
ModelAccess.instance().runReadAction(new Runnable() {
public void run() {
List<Solution> solutions = MPSModuleRepository.getInstance().getAllSolutions();
solRefs.value = ListSequence.fromList(solutions).select(new ISelector<Solution, ModuleReference>() {
public ModuleReference select(Solution it) {
return it.getModuleReference();
}
}).toListSequence();
}
});
return CommonChoosers.showDialogModuleCollectionChooser(myOwner.getMainComponent(), "solution", solRefs.value, null);
}
}